function diff = gen_data(X1, X2, norm_type)
%generate_data Preprocesses the data given - each pair is transformed
%              into norm(X1 - X2) - norm can be L1, L2 or  Hellinger
%              distance.
    num_of_pics = size(X1,2);
    diff = zeros(num_of_pics,1);
    
    for pic=1:num_of_pics
        if strcmp(norm_type,'hellinger')
            diff(pic,1) = hellinger_norm(X1(:, pic),X2(:, pic));
        elseif strcmp(norm_type,'L1')
            diff(pic,1) = norm(X1(:, pic)-X2(:, pic),1);
        elseif strcmp(norm_type,'L2')
            diff(pic,1) = norm(X1(:, pic)-X2(:, pic),2);
        else
            fprintf('Norm type not supported.');
        end
    end
end

